package com.bdqn.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.time.LocalDate;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author dede
 * @since 2020-05-22
 */
public class PsUser extends Model<PsUser> {

    private static final long serialVersionUID=1L;

    @TableId(value = "ID", type = IdType.AUTO)
    private Long id;

    @TableField("USERCODE")
    private String usercode;

    @TableField("USERNAME")
    private String username;

    @TableField("USERPASSWORD")
    private String userpassword;

    @TableField("SEX")
    private String sex;

    @TableField("AGE")
    private Integer age;

    @TableField("ENTRYDATE")
    private String entrydate;

    @TableField("DIMISSIONDATE")
    private String dimissiondate;

    @TableField("PHONETEL")
    private String phonetel;

    @TableField("EMAIL")
    private String email;

    @TableField("CREATIONTIME")
    private LocalDateTime creationtime;

    @TableField("LASTLOGINTIME")
    private LocalDateTime lastlogintime;

    @TableField("CREATEDBY")
    private String createdby;

    @TableField("LASTUPDATETIME")
    private LocalDateTime lastupdatetime;

    @TableField("USERSTATUS")
    private Integer userstatus;

    @TableField("ROLEID")
    private PsRole psRole;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsercode() {
        return usercode;
    }

    public void setUsercode(String usercode) {
        this.usercode = usercode;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserpassword() {
        return userpassword;
    }

    public void setUserpassword(String userpassword) {
        this.userpassword = userpassword;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }

    public String getEntrydate() {
        return entrydate;
    }

    public void setEntrydate(String entrydate) {
        this.entrydate = entrydate;
    }

    public String getDimissiondate() {
        return dimissiondate;
    }

    public void setDimissiondate(String dimissiondate) {
        this.dimissiondate = dimissiondate;
    }

    public String getPhonetel() {
        return phonetel;
    }

    public void setPhonetel(String phonetel) {
        this.phonetel = phonetel;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public LocalDateTime getCreationtime() {
        return creationtime;
    }

    public void setCreationtime(LocalDateTime creationtime) {
        this.creationtime = creationtime;
    }

    public LocalDateTime getLastlogintime() {
        return lastlogintime;
    }

    public void setLastlogintime(LocalDateTime lastlogintime) {
        this.lastlogintime = lastlogintime;
    }

    public String getCreatedby() {
        return createdby;
    }

    public void setCreatedby(String createdby) {
        this.createdby = createdby;
    }

    public LocalDateTime getLastupdatetime() {
        return lastupdatetime;
    }

    public void setLastupdatetime(LocalDateTime lastupdatetime) {
        this.lastupdatetime = lastupdatetime;
    }

    public Integer getUserstatus() {
        return userstatus;
    }

    public void setUserstatus(Integer userstatus) {
        this.userstatus = userstatus;
    }



    public PsRole getPsRole() {
		return psRole;
	}

	public void setPsRole(PsRole psRole) {
		this.psRole = psRole;
	}

	@Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "PsUser{" +
        "id=" + id +
        ", usercode=" + usercode +
        ", username=" + username +
        ", userpassword=" + userpassword +
        ", sex=" + sex +
        ", age=" + age +
        ", entrydate=" + entrydate +
        ", dimissiondate=" + dimissiondate +
        ", phonetel=" + phonetel +
        ", email=" + email +
        ", creationtime=" + creationtime +
        ", lastlogintime=" + lastlogintime +
        ", createdby=" + createdby +
        ", lastupdatetime=" + lastupdatetime +
        ", userstatus=" + userstatus +
        ", roleid=" + psRole.getId() +
        "}";
    }
}
